4K视界[V2].js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. var rule = {
  2. title: '4K视界[V2]', // csp_AppYsV2
  3. host: 'http://yycms.77ev.cn/api.php/app/',
  4. url: 'video?tid=fyclassfyfilter&limit=20&pg=fypage',
  5. filter_url:'&class={{fl.class}}&area={{fl.area}}&lang={{fl.lang}}&letter={{fl.letter}}&year={{fl.year}}&by={{fl.by}}',
  6. filter: {
  7. "1":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"警匪","v":"警匪"},{"n":"犯罪","v":"犯罪"},{"n":"动画","v":"动画"},{"n":"奇幻","v":"奇幻"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"悬疑","v":"悬疑"},{"n":"惊悚","v":"惊悚"},{"n":"经典","v":"经典"},{"n":"青春","v":"青春"},{"n":"文艺","v":"文艺"},{"n":"微电影","v":"微电影"},{"n":"古装","v":"古装"},{"n":"历史","v":"历史"},{"n":"运动","v":"运动"},{"n":"农村","v":"农村"},{"n":"儿童","v":"儿童"},{"n":"网络电影","v":"网络电影"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  8. "21":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  9. "2":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"古装","v":"古装"},{"n":"战争","v":"战争"},{"n":"青春偶像","v":"青春偶像"},{"n":"喜剧","v":"喜剧"},{"n":"家庭","v":"家庭"},{"n":"犯罪","v":"犯罪"},{"n":"动作","v":"动作"},{"n":"奇幻","v":"奇幻"},{"n":"剧情","v":"剧情"},{"n":"历史","v":"历史"},{"n":"经典","v":"经典"},{"n":"乡村","v":"乡村"},{"n":"情景","v":"情景"},{"n":"商战","v":"商战"},{"n":"网剧","v":"网剧"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  10. "3":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  11. "4":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"情感","v":"情感"},{"n":"科幻","v":"科幻"},{"n":"热血","v":"热血"},{"n":"推理","v":"推理"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":"冒险"},{"n":"萝莉","v":"萝莉"},{"n":"校园","v":"校园"},{"n":"动作","v":"动作"},{"n":"机战","v":"机战"},{"n":"运动","v":"运动"},{"n":"战争","v":"战争"},{"n":"少年","v":"少年"},{"n":"少女","v":"少女"},{"n":"社会","v":"社会"},{"n":"原创","v":"原创"},{"n":"亲子","v":"亲子"},{"n":"益智","v":"益智"},{"n":"励志","v":"励志"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"国产","v":"国产"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  12. "23":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  13. "24":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  14. "20":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}]
  15. },
  16. detailUrl:'/detail?vod_id=fyid',
  17. searchUrl: '/search?text=**&pg=fypage',
  18. searchable: 2,
  19. quickSearch: 0,
  20. filterable:1,//是否启用分类筛选,
  21. headers:{'User-Agent':'okhttp/4.1.0'},
  22. timeout:5000,
  23. // 分类筛选 /api.php/app/nav || /xgapp.php/v1/nav || /api.php/v1.vod/types
  24. class_name: '电影&国产剧&电视剧&动漫&综艺&欧美剧&日韩剧&动画片少儿',
  25. class_url: '1&21&2&3&4&23&24&20',
  26. play_parse:true,
  27. lazy:`js:
  28. let play_Url = '';
  29. if (/\\.m3u8|\\.mp4/.test(input)) {
  30. input = {
  31. jx: 0,
  32. url: input,
  33. parse: 0
  34. }
  35. } else if (/,/.test(input) && /url=/.test(input)) {
  36. input = input.split('url=');
  37. play_Url = input[0].split(',')[0];
  38. input = {
  39. jx: 0,
  40. url: input[1],
  41. playUrl: play_Url,
  42. parse: 1
  43. }
  44. } else if (/url=|id=/.test(input)) {
  45. input = {
  46. jx: 0,
  47. url: JSON.parse(request(input)).url,
  48. parse: 0
  49. }
  50. } else if (/youku|iqiyi|v\\.qq\\.com|pptv|sohu|le\\.com|1905\\.com|mgtv|bilibili|ixigua/.test(input)) {
  51. play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'https://jx.777jiexi.com/player/?url='; // type0的parse
  52. // play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'json:http://pandown.pro/app/kkdy.php?url='; // type1的parse可加'json:'直接解析url (除了蜂蜜的'影视TV',其它的壳皆可用)
  53. input = {
  54. jx: 0,
  55. url: input,
  56. playUrl: play_Url,
  57. parse: 1,
  58. header: JSON.stringify({
  59. 'user-agent': 'Mozilla/5.0',
  60. }),
  61. }
  62. } else if (/^YuMi|^FEI-/.test(input)) {
  63. let purl = JSON.parse(request("http://175.178.183.192:84/api/?key=f3913eb3f85a8298b3e6e427b8712b2e&url=" + input)).url;
  64. input = {
  65. jx: 0,
  66. url: purl,
  67. // url: input,
  68. // playUrl: 'json:http://175.178.183.192:84/api/?key=f3913eb3f85a8298b3e6e427b8712b2e&url=',
  69. parse: 0
  70. }
  71. } else {
  72. input
  73. }
  74. `,
  75. limit:6,
  76. // 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
  77. 推荐:`js:
  78. let d = [];
  79. let jsondata = [];
  80. let videoList = [];
  81. if (/v1\\.vod/.test(HOST)) {
  82. if(HOST.endsWith('/')){
  83. jsondata = JSON.parse(request(HOST + 'vodPhbAll'));
  84. } else {
  85. jsondata = JSON.parse(request(HOST + '/vodPhbAll'));
  86. }
  87. videoList = jsondata.data.list;
  88. } else {
  89. if(HOST.endsWith('/')){
  90. jsondata = JSON.parse(request(HOST + 'index_video'));
  91. } else {
  92. jsondata = JSON.parse(request(HOST + '/index_video'));
  93. }
  94. videoList = /xgapp/.test(HOST) ? jsondata.data : jsondata.list;
  95. }
  96. // log('videoList =========> '+stringify(videoList));
  97. videoList.forEach((it,idex) => {
  98. let vlist = /v1\\.vod/.test(HOST) ? videoList[idex].vod_list : videoList[idex].vlist ;
  99. vlist.forEach(it => {
  100. d.push({
  101. url:it.vod_id,
  102. title:it.vod_name,
  103. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  104. desc:it.vod_remarks,
  105. });
  106. });
  107. });
  108. setResult(d);
  109. `,
  110. 一级:`js:
  111. let d = [];
  112. let jsondata = [];
  113. let videoList = [];
  114. if (/v1\\.vod/.test(HOST)) {
  115. input = input.replace('video','v1.vod').replace('tid','type').replace('pg=','page=');
  116. jsondata = JSON.parse(request(input));
  117. videoList = jsondata.data.list;
  118. } else {
  119. input = HOST + '/'+ input.split('/')[4];
  120. jsondata = JSON.parse(request(input));
  121. videoList = jsondata.list || jsondata.data;
  122. }
  123. // log('videoList =========> '+stringify(videoList));
  124. videoList.forEach(it => {
  125. d.push({
  126. url:it.vod_id,
  127. title:it.vod_name,
  128. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  129. desc:it.vod_remarks,
  130. });
  131. });
  132. setResult(d);
  133. `,
  134. 二级:`js:
  135. if (/v1\\.vod/.test(HOST)) {
  136. input = HOST + '/'+ input.split('/')[3];
  137. } else {
  138. input = HOST + '/'+ input.split('/')[3].replace('detail','video_detail').replace('vod_id','id');
  139. }
  140. try {
  141. let html = request(input);
  142. html = JSON.parse(html);
  143. let node = /xgapp/.test(HOST) ? html.data.vod_info : html.data;
  144. VOD = {
  145. vod_id: node.vod_id,
  146. vod_name: node.vod_name,
  147. vod_pic: node.vod_pic,
  148. type_name: node.vod_class,
  149. vod_year: node.vod_year,
  150. vod_area: node.vod_area,
  151. vod_remarks: node.vod_remarks,
  152. vod_actor: node.vod_actor,
  153. vod_director: node.vod_director,
  154. vod_content: node.vod_content.strip()
  155. };
  156. if (typeof play_url === 'undefined') {
  157. var play_url = ''
  158. }
  159. let episodes = /v1\\.vod/.test(HOST)?node.vod_play_list:node.vod_url_with_player;
  160. if (episodes != '') {
  161. let playMap = {};
  162. episodes.forEach(ep => {
  163. let from = [];
  164. if (/v1\\.vod/.test(HOST)) {
  165. from = ep.player_info.from||ep.player_info.show||ep.from||ep.show;
  166. } else {
  167. from = ep.code||ep.name;
  168. }
  169. if (!playMap.hasOwnProperty(from)) {
  170. playMap[from] = []
  171. }
  172. let parse_api = '';
  173. if (/v1\\.vod/.test(HOST)) {
  174. parse_api = ep.player_info.parse != null ? ep.player_info.parse : ep.player_info.parse2;
  175. // parse_api = /,/.test(parse_api) ? parse_api.split(',')[1] : parse_api;
  176. } else {
  177. parse_api = ep.parse_api;
  178. }
  179. log('parse_api =========> '+parse_api);
  180. if (parse_api != null && !/\\.m3u8|\\.mp4/.test(ep.url)) {
  181. parse_api = parse_api.replaceAll('..','.') ;
  182. ep.url = ep.url.replaceAll('$','$'+parse_api);
  183. }
  184. playMap[from].push(ep.url)
  185. });
  186. let playFrom = [];
  187. let playList = [];
  188. Object.keys(playMap).forEach(key => {
  189. playFrom.push(key);
  190. playList.push(playMap[key])
  191. });
  192. VOD.vod_play_from = playFrom.join('$$$');
  193. VOD.vod_play_url = playList.join('$$$');
  194. } else {
  195. VOD.vod_play_from = node.vod_play_from;
  196. VOD.vod_play_url = node.vod_play_url;
  197. }
  198. } catch (e) {
  199. log("获取二级详情页发生错误:" + e.message);
  200. }
  201. `,
  202. 搜索:`js:
  203. let d = [];
  204. let jsondata = [];
  205. let videoList = [];
  206. if (/v1\\.vod/.test(HOST)) {
  207. input = (HOST + '/'+ input.split('/')[3]).replace('/search','').replace('text=','wd=').replace('pg=','page=');
  208. jsondata = JSON.parse(request(input));
  209. videoList = jsondata.data.list;
  210. } else {
  211. input = HOST + '/'+ input.split('/')[3]
  212. jsondata = JSON.parse(request(input));
  213. videoList = jsondata.list || jsondata.data;
  214. }
  215. // log('videoList =========> '+stringify(videoList));
  216. videoList.forEach(it => {
  217. d.push({
  218. url:it.vod_id,
  219. title:it.vod_name,
  220. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  221. desc:it.vod_remarks,
  222. });
  223. });
  224. setResult(d);
  225. `,
  226. }